FROM ossrs/srs:v4.0

LABEL maintainer="frep@hzcsai.com"

ARG VENDOR
ARG PROJECT
ARG REPOSITORY
ARG TAG
ARG DATE
ARG VERSION
ARG URL
ARG COMMIT
ARG BRANCH

LABEL org.label-schema.schema-version="1.0" \
      org.label-schema.build-date=$DATE \
      org.label-schema.name=$REPOSITORY \
      org.label-schema.description="HZCS Factory Rep" \
      org.label-schema.url="https://www.hzcsai.com" \
      org.label-schema.vcs-url=$URL \
      org.label-schema.vcs-ref=$COMMIT \
      org.label-schema.vcs-branch=$BRANCH \
      org.label-schema.vendor=$VENDOR \
      org.label-schema.version=$VERSION

ENV TZ=Asia/Shanghai \
    LANG=C.UTF-8 \
    PYTHONIOENCODING=utf-8 \
    DEBIAN_FRONTEND=noninteractive \
    APT_INSTALL="yum install -y" \
    PIP_INSTALL="python3 -m pip install --no-cache-dir --retries 20 --timeout 120 --trusted-host mirrors.aliyun.com --extra-index-url https://mirrors.aliyun.com/pypi/simple"

WORKDIR /frepai

RUN $APT_INSTALL \
        iputils-ping net-tools tree \
        bzip2 unzip wget python3 python3-pip

RUN python3 -m pip install -U pip && \
        $PIP_INSTALL flask flask_cors setproctitle requests zmq && \
        $PIP_INSTALL protobuf omegaconf redis cos-python-sdk-v5

SHELL ["/bin/bash"]
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
